import { createSlice } from '@reduxjs/toolkit';

const screenSyncSlice = createSlice({
	name: 'screenSync',
	initialState: {
		screenStatus: 'idle',
		screenSyncCmdId: null,
		screenSynsSize: {},
		customerClientId: '',
		messageIn: {}
	},
	reducers: {
		setScreenStatus(state, action) {
			return { ...state, screenStatus: action.payload };
		},
		setScreenSyncCmdId(state, action) {
			return { ...state, screenSyncCmdId: action.payload };
		},
		setScreenSynsSize(state, action) {
			return { ...state, screenSynsSize: action.payload };
		},
		setMessageIn(state, action) {
			return { ...state, messageIn: action.payload };
		},
		setCustomerClientId(state, action) {
			return { ...state, customerClientId: action.payload };
		}
	}
});

export const { setScreenStatus, setScreenSynsSize, setMessageIn, setCustomerClientId } = screenSyncSlice.actions;
export default screenSyncSlice.reducer;
